
from selenium.webdriver.common.by import By


from Page.Login import Login


class settle_Page(Login):
    #元素定位
    # 定位结算管理
    jie_loc = (By.XPATH, '/html/body/div[1]/div[2]/div[2]/div[2]/div[11]/h2/span')
    # 结算记录管理
    jilu_loc = (By.XPATH, '/html/body/div[1]/div[2]/div[2]/div[2]/div[12]/ul/li/div/a')
    # 发起结算
    faqi_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[3]/div[2]/div[1]/ul/li[1]/a/span')
    # 输入用户编号
    hao_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[1]/div/fieldset/dl[1]/dd/input')
    # 输入用户名
    yh_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[1]/div/fieldset/dl[2]/dd/input')
    # 点击获取可结算余额
    money_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[1]/div/fieldset/dl[3]/dd/a')
    # 输入结算余额
    shu_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[1]/div/fieldset/dl[4]/dd/input')
    # 提交按钮
    ti_loc = (By.XPATH, '/html/body/div[1]/div[3]/div/div[2]/div[4]/div/form/div[2]/ul/li[1]/div/div/button')

    def jiesuan(self):
        self.click(self.jie_loc)

    def guanli(self):
        self.click(self.jilu_loc)

    def faqi(self):
        self.click(self.faqi_loc)

    def bianhao(self):
        self.send_keys(self.hao_loc,'123')

    def phone(self):
        self.send_keys(self.yh_loc,'123')

    def money(self):
        self.click(self.money_loc)

    def shu(self):
        self.send_keys(self.shu_loc,'aa')

    def ti(self):
        self.click(self.ti_loc)

